<?php
	$delete=$_GET['guilde'];
	$raison=$_POST['raison'];
	
	if(!$raison){
		$raison=$_GET['raison'];
	}

	$res = mysql_query("SELECT nmg_nom AS nom FROM nm_guildes WHERE nmg_id='$delete';");
	$supp = mysql_fetch_object($res);
	
	echo "<h2>Suppression de la guilde $delete (".$supp->nom.")</h2>";
		
	logs($login,"Suppression","Suppression de la guilde $delete ($raison)",5,$delete);
	stockArchive($delete, $raison);
	$id_guilde=$delete;
	lnmConnectDB();
  $query="DELETE FROM nm_guildes WHERE nmg_id='$id_guilde';";
  $result=mysql_query($query);
  $query2="UPDATE nm_royaume SET nmr_guilde='0',nmr_wguilde='0' WHERE nmr_guilde='$id_guilde';";
  $result2=mysql_query($query2);
?>